<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>asdfsdf</title>
</head>
<body>

<div id="main">
    <div v-for = "teacher in teachers">
        <span>{{ teacher.name }}</span>
    </div>

</div>

</body>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
<script>
    let app = new Vue({
        el: '#main',
        data: {
            teachers: [],
            subjects: [],
        },
        created() {

            fetch('/polls/teacher/').then(resp => resp.json())
                .then(json => {
                    this.teachers = json.teachers
                    this.subjects = json.subjectName
                    console.log(this.teachers)
                })


        }
    })


</script>
</html>